<form class="layui-form layui-card" action='{:url("export_baoming")}' data-auto="true" method="get" autocomplete="off">
    <div class="layui-card-body" style="padding-top: 20px;height: 100%" id="media">

        <div class="layui-form-item">
            <label class="layui-form-label">班级</label>
            <div class="layui-input-block">
                <input name="class_id" value="{$vo.class_id|default=''}" placeholder="请选择班级，非必填"  class="layui-input selectpage" data-source="/admin/school_class/selectpage" data-field="name">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">课程</label>
            <div class="layui-input-block">
                <input name="course_id" value="{$vo.course_id|default=''}" placeholder="请选择课程，非必填"  class="layui-input selectpage" data-source="/admin/course/selectpage" data-field="name">
            </div>
        </div>

        <div class="hr-line-dashed"></div>
        <div class="layui-form-item text-center">
            <!--{notempty name='vo.id'}-->
<!--            <input type='hidden' value='{$vo.id}' name='id'>-->
            <!--{/notempty}-->
            <button class="layui-btn" data-import-list type='button'>导出数据</button>
            <button class="layui-btn layui-btn-danger" type='button' data-confirm="确定要取消吗？" data-close>取消</button>
        </div>
    </div>
</form>


{block name="script"}
<script>
    window.form.render();
    $('[data-import-list]').on('click', function () {
        window.location.href = '{:url("export_baoming",false,false)}?' + $(this).parents('form').serialize()
    });
</script>

<script>
    require(['layui'],function () {
        layui.use(['form','laydate','layer'],function() {
            window.form = layui.form;
            require(['form'], function () {
                apply('{$vo.is_hot|default="0"}');
                window.form.render();
                window.form.on('radio(bannertype)', function (data) {
                    apply(data.value);
                });
                function apply(value) {
                     $("[data-is_hot='" + value + "']").trigger('click');
                }
            })

        })
    });
</script>
{/block}